package top.huhuiyu.springboot3.dao.api;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import top.huhuiyu.springboot3.entity.api.TbDataHistory;

@Mapper
public interface TbDataHistoryMapper extends BaseMapper<TbDataHistory> {

    @Select("""
            select *
            from tb_data_history
            where `month` = month(now()) and `day` = day(now())
            order by rand()
            limit 1
            """)
    TbDataHistory randHistory();
}
